export const routes = [
  {
    path: "/login",
    component: () => {
      return import("@/views/web/login.vue");
    },
    meta: {
      hidden: true,
      title: "登录",
    },
  },
  {
    path: "/",
    component: () => import("@/layout/index.vue"),
    redirect: "/home",
    name: "Home",
    meta: {
      title: "首页",
    },
    children: [
      {
        path: "/home",
        name: "IndexView",
        component: () => import("@/views/web/index.vue"),
        meta: {
          title: "首页",
          icon: "home",
          class: "web-index",
        },
      },
      {
        path: "/domain",
        component: () => import("@/views/web/domain.vue"),
        name: "Domain",
        meta: {
          title: "域名管理",
          icon: "global",
        },
      },
      {
        path: "/service",
        component: () => import("@/views/web/service.vue"),
        name: "Service",
        meta: {
          title: "服务管理",
          icon: "appstore",
        },
      },
      {
        path: "/policy",
        redirect: "/policy/web",
        component: () => import("@/layout/main.vue"),
        meta: {
          title: "策略管理",
          icon: "file-protect",
        },
        children: [
          {
            path: "/policy/web",
            component: () => import("@/views/web/web.vue"),
            name: "Web",
            meta: {
              title: "Web应用防护",
            },
          },
          {
            path: "/policy/network",
            name: "Network",
            component: () => import("@/views/web/network.vue"),
            meta: {
              title: "网络访问控制",
            },
          },
        ],
      },
      {
        path: "/system",
        name: "System",
        redirect: "/system/user",
        component: () => import("@/layout/main.vue"),
        meta: {
          title: "系统设置",
          icon: "setting",
        },
        children: [
          {
            path: "/system/user",
            component: () => import("@/views/sys-manage/user.vue"),
            name: "SysManageUser",
            meta: {
              title: "管理员管理",
            },
          },
          {
            path: "/system/role",
            component: () => import("@/views/sys-manage/role.vue"),
            name: "SysManageRole",
            meta: {
              title: "管理员角色",
            },
          },
          {
            path: "/system/organization",
            component: () => import("@/views/sys-manage/organization.vue"),
            name: "SysManageOrganization",
            meta: {
              title: "组织管理",
            },
          },
          {
            path: "/system/logStorage",
            component: () => import("@/views/sys-manage/logStorage.vue"),
            name: "SysManageLogStorage",
            meta: {
              title: "日志配置",
            },
          },
          {
            path: "/system/timeLock",
            component: () => import("@/views/sys-manage/time-lock.vue"),
            name: "SysManageTimeLock",
            meta: {
              title: "系统时间同步",
            },
          },
        ],
      },
    ],
  },
];
